<%-- 
    Document   : confirmList
    Created on : May 8, 2011, 1:34:56 PM
    Author     : Kevin
--%>

<%@page contentType="text/html" import="java.util.*" import="com.movie.*" pageEncoding="UTF-8"%>
<% List confirmList = (List) request.getAttribute("confirmList");%>
<!DOCTYPE html>
<%@include file="headero.html"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>ComfirmBooking</title>
    </head>
    <body>
        <h1>Choose the book to confirm</h1><br>
        <form action="dispatcher?operation=finishconfirm" method="post">
           
            <table width="750px">
                <tr>
                    <td></td>
                    <td align="center">Book by user</td>
                    <td align="center">Movie name </td>
                    <td align="center">Number of tickets   </td>
                    <td align="center">Movie time   </td>
                </tr>   
             <% for (int i = 0; i < confirmList.size(); i++) {
                    Book book = (Book) confirmList.get(i);%>
                <tr>
                    <td><input type ="checkbox" name="confirmed" value="<%=book.getIdbook()%>"></td>
                    <td align="center"><%= book.getViewer().getUsername()%></td>
                    <td align="center"><%= book.getShow().getMovie().getTitle()%></td>
                    <td align="center"><%=book.getNumberofseats()%></td>
                    <td align="center"><%=book.getDate()%>-<%=book.getShow().ShowTime()%></td>
                </tr>
                 <%}%>
                <tr>
                    <td><input type="submit" value="confirm"></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr> 
            </table>
           
        </form>    
    </body>
</html>
<%@include file="footer.html"%>